home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj0287.arc
/
BUSPERF.C
next >
Wrap
Text File
|
1986-11-25
|
1KB
|
38 lines
/* Program for timing bus performance of IBM compatibles.
By: Ted Mirecki, October 1986.
For LATTICE C compiler versions 2.x and higher;
may require modifications for other compilers.
*/
long basetime = 54001.0; /* Timer count on base PC */
double period = 1/1.19318; /* Microseconds per timer count */
int timerset(); /* ASM functions in BUSPERFX.ASM */
long bustest();
main()
{
long count;
double msecs, index;
static char dispform[] = "%-8s %8ld %7.3f\n";
printf("\n\nBUSPERF -- PC Bus Performance Analyser\n");
printf(" (C) Copyright PC TECH Journal 1986\n\n\n");
timerset(); /* initialize timer mode */
count = bustest(); /* perform the test */
/* calc & display results */
printf(" Timer Count MilliSeconds\n");
msecs = period * basetime / 1000.0;
printf(dispform, "Base PC", basetime, msecs);
msecs = period * count / 1000.0;
printf(dispform, "This Run", count, msecs);
index = (double) basetime / (double) count;
printf("\nBus Performance index: %5.2f\n", index);
}